 package model

import (
    "gorm.io/gorm"
    "time"
)

// User 用户模型
type User struct {
    ID        uint64         `gorm:"primaryKey"`
    Username  string         `gorm:"type:varchar(50);not null"`
    Password  string         `gorm:"type:varchar(100);not null"`
    RealName  string         `gorm:"type:varchar(20)"`
    IDCard    string         `gorm:"type:varchar(18)"`
    Phone     string         `gorm:"type:varchar(11);uniqueIndex"`
    Email     string         `gorm:"type:varchar(50);uniqueIndex"`
    Avatar    string         `gorm:"type:varchar(255)"`
    Status    int8           `gorm:"type:tinyint;default:1;not null"`
    CreatedAt time.Time      `gorm:"autoCreateTime"`
    UpdatedAt time.Time      `gorm:"autoUpdateTime"`
    DeletedAt gorm.DeletedAt `gorm:"index"`
}